import { useContext } from "react";
import { themeContext } from "@/themeContext";

// 使用上下文中的属性
const useMyContext = () => {
  let {
    darkMode,
    switchDarkMode,
    watermarkFlag,
    swtichWatermarkFlag,
    handle,
    isFullScreen,
    switchFullScreen,
    openMessage,
    messageApi,
  } = useContext(themeContext);
  return {
    darkMode,
    switchDarkMode,
    watermarkFlag,
    swtichWatermarkFlag,
    handle,
    isFullScreen,
    switchFullScreen,
    openMessage,
    messageApi,
  };
};

export default useMyContext;
